package SecondeStage.Collection;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionFor {
    public static void main(String[] args) {
        Collection collection = new ArrayList();
        collection.add(new Book("三国演义","罗贯中",10.1));
        collection.add(new Book("小李飞刀","古龙",10.1));
        collection.add(new Book("红楼梦","曹雪芹",10.1));

        // 增强for循环 快捷方式：I
        for (Object book:collection){
            System.out.println(book);
        }
    }
}
